package com.syy.controller.admin.definition.vo.process;

import com.syy.controller.admin.definition.vo.model.BpmModelMetaInfoVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 流程定义 Response VO")
@Data
@Accessors(chain = true)
public class BpmProcessDefinitionRespVO extends BpmModelMetaInfoVO {

    private String id;

    private Integer version;

    private String name;

    private String key;

    @Schema(description = "流程分类", example = "1")
    private String category;
    @Schema(description = "流程分类名字", example = "请假")
    private String categoryName;

    private Integer modelType; // 参见 BpmModelTypeEnum 枚举类

    private String modelId;

    private String formConf;

    private List<String> formFields;

    @Schema(description = "表单名字", example = "请假表单")
    private String formName;

    private Integer suspensionState; // 参见 SuspensionState 枚举

    @Schema(description = "部署时间")
    private LocalDateTime deploymentTime; // 需要从对应的 Deployment 读取，非必须返回

    @Schema(description = "BPMN XML")
    private String bpmnXml; // 需要从对应的 BpmnModel 读取，非必须返回

    @Schema(description = "SIMPLE 设计器模型数据 json 格式")
    private String simpleModel; // 非必须返回

    private Long sort;

    @Schema(description = "BPMN UserTask 用户任务")
    @Data
    public static class UserTask {

        private String id;

        private String name;

    }

}
